import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long a = in.nextInt();
        long h = in.nextInt();
        long b = in.nextInt();
        long k = in.nextInt();

        long ret = 0;
        while(h > 0 && k > 0) {
            //先受着
            ret += (a+b);
            //互相攻击
            h -= b;
            k -= a;
        }
        if(h > 0) ret += (10*a);
        if(k > 0) ret += (10*b);

        System.out.println(ret);
    }
}